<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>专辑库 - QQ音乐</title>
  
</head>
    <style>
        :root {
            --primary-color: #31c27c;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            margin: 0;
            background: #f5f5f5;
            font-family: Microsoft Yahei;
            font-size: 14px;
            min-width: 1000px;
            color: #333;
        }

        a {
            text-decoration: none;
            color: #000;
        }

        header {
            height: 90px;
            background: white;
            display: flex;
            align-items: center;
            box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        }

        .header-inner, main {
            width: 1200px;
            margin: auto;
        }

        .logo img {
            width: 170px;
            height: 46px;
        }

        .section-title {
            text-align: center;
            font-size: 28px;
            margin: 40px 0 30px;
            font-weight: bold;
        }

        .tag-list {
            margin-top: 50px;
            margin-bottom: 15px;
            text-align: center; /* 居中显示标签 */
        }

        .tag-item {
            display: inline-block;
            padding: 0 8px;
            margin-right: 24px;
            line-height: 26px;
            color: #000;
            text-decoration: none;
        }

        .tag-active {
            background: var(--primary-color);
            color: white;
        }

        .tag-item:not(.tag-active):hover {
            color: var(--primary-color);
        }


        .nowrap {
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .playlist {
            display: grid;
            grid-template-columns: repeat(5, 1fr);
            gap: 45px 15px;
            margin-bottom: 45px;
        }

        .cover-wrap {
            display: flex;
            position: relative;
            overflow: hidden;
            width: 100%;
            margin-bottom: 15px;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            border-radius: 8px; /* 添加圆角 */
        }

        .cover-img {
            width: 100%;
            transition: all 0.75s;
            border-radius: 8px; /* 添加圆角 */
        }

        .cover-mask {
            position: absolute;
            left: 0;
            top: 0;
            right: 0;
            bottom: 0;
            background: #000;
            opacity: 0;
            transition: all 0.5s;
            border-radius: 8px; /* 添加圆角 */
        }

        .cover-play {
            position: absolute;
            left: 50%;
            top: 50%;
            margin-left: -35px;
            margin-top: -35px;
            opacity: 0;
            transform: scale(0.7);
            transition: all 0.5s;
            width: 70px; /* 固定播放按钮大小 */
            height: 70px;
            fill: white; /* 播放图标颜色 */
        }

        .cover-wrap:hover .cover-mask {
            opacity: 0.2;
        }

        .cover-wrap:hover .cover-play {
            opacity: 1;
            transform: scale(1);
        }

        .cover-wrap:hover .cover-img {
            transform: scale(1.07);
        }

        .album-title {
            font-weight: 500;
            margin-bottom: 5px;
        }
        .album-title:hover {
            color: var(--primary-color);
        }

        .album-author {
            color: #999;
            line-height: 1.6;
            font-size: 13px;
        }
        .album-author:hover {
            color: var(--primary-color);
        }

        .album-time {
            color: #999;
            font-size: 12px;
        }

        .new-songs {
            background-color: white;
            padding: 20px;
            border-radius: 8px;
            margin-bottom: 40px;
        }

        .new-songs-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 20px;
            margin-bottom: 20px;
        }

        .play-all-btn {
            padding: 8px 16px;
            background-color: #fff;
            border: 1px solid #ddd;
            border-radius: 4px;
            cursor: pointer;
            font-size: 14px;
            display: flex;
            align-items: center;
            gap: 5px;
            white-space: nowrap;
            transition: all 0.3s;
        }

        .play-all-btn:hover {
            background-color: #f5f5f5;
            border-color: #ccc;
        }

        /* 三角播放按钮动画样式 */
        .triangle-play-btn {
            position: relative;
            width: 16px;
            height: 16px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .triangle-play-btn svg {
            position: absolute;
            width: 100%;
            height: 100%;
            transition: opacity 0.3s;
        }

        .triangle-static {
            opacity: 1;
        }

        .triangle-animated {
            opacity: 0;
        }

        .play-all-btn:hover .triangle-static {
            opacity: 0;
        }

        .play-all-btn:hover .triangle-animated {
            opacity: 1;
            animation: pulse 1.5s infinite;
        }

        @keyframes pulse {
            0% {
                transform: scale(1);
                opacity: 1;
            }
            50% {
                transform: scale(1.2);
                opacity: 0.7;
            }
            100% {
                transform: scale(1);
                opacity: 1;
            }
        }

        .new-songs-tabs {
            display: flex;
            justify-content: center;
            gap: 30px;
            flex-grow: 1;
            flex-wrap: wrap;
        }

        .new-songs-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 20px;
        }

        .new-song-item {
            display: flex;
            align-items: center;
            padding: 10px;
            border-radius: 8px;
            transition: all 0.3s ease;
            cursor: pointer;
        }

        .new-song-item:hover {
            background-color: #f0f0f0;
            transform: translateX(5px);
            box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        }

        .new-song-img-wrap {
            position: relative;
            overflow: hidden;
            border-radius: 4px;
            flex-shrink: 0;
        }

        .new-song-img {
            width: 60px;
            height: 60px;
            object-fit: cover;
            transition: all 0.75s;
        }

        .new-song-img-mask {
            position: absolute;
            left: 0;
            top: 0;
            right: 0;
            bottom: 0;
            background: #000;
            opacity: 0;
            transition: all 0.5s;
        }

        .new-song-play {
            position: absolute;
            left: 50%;
            top: 50%;
            margin-left: -15px;
            margin-top: -15px;
            opacity: 0;
            transform: scale(0.7);
            transition: all 0.5s;
            width: 30px;
            height: 30px;
            fill: white;
        }

        .new-song-img-wrap:hover .new-song-img-mask {
            opacity: 0.2;
        }

        .new-song-img-wrap:hover .new-song-play {
            opacity: 1;
            transform: scale(1);
        }

        .new-song-img-wrap:hover .new-song-img {
            transform: scale(1.07);
        }

        .new-song-info {
            margin-left: 15px;
            flex: 1;
            min-width: 0;
        }

        .new-song-title {
            font-weight: 500;
            margin-bottom: 5px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .new-song-artist {
            color: #666;
            font-size: 13px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .new-song-duration {
            color: #999;
            font-size: 13px;
            margin-left: 15px;
            flex-shrink: 0;
        }

        .mv-section {
            background-color: white;
            padding: 20px;
            border-radius: 8px;
            margin-bottom: 40px;
        }

        .mv-tabs {
             margin-top: 20px; /* 增加顶部间距 */
            margin-bottom: 20px;
            text-align: center; /* 居中显示MV标签 */
        }

        .mv-grid {
            display: grid;
            grid-template-columns: repeat(5, 1fr);
            gap: 20px;
        }

        .mv-item {
            position: relative;
            overflow: hidden;
            border-radius: 8px;
            transition: transform 0.3s;
        }

        .mv-item:hover {
            transform: scale(1.02);
        }

        .mv-img-wrap {
            position: relative;
            overflow: hidden;
            border-radius: 8px;
        }

        .mv-item img {
            width: 100%;
            height: 120px;
            object-fit: cover;
            transition: all 0.75s;
            border-radius: 8px;
        }

        .mv-mask {
            position: absolute;
            left: 0;
            top: 0;
            right: 0;
            bottom: 0;
            background: #000;
            opacity: 0;
            transition: all 0.5s;
            border-radius: 8px;
        }

        .mv-play {
            position: absolute;
            left: 50%;
            top: 50%;
            margin-left: -25px;
            margin-top: -25px;
            opacity: 0;
            transform: scale(0.7);
            transition: all 0.5s;
            width: 50px;
            height: 50px;
            fill: white;
        }

        .mv-img-wrap:hover .mv-mask {
            opacity: 0.2;
        }

        .mv-img-wrap:hover .mv-play {
            opacity: 1;
            transform: scale(1);
        }

        .mv-img-wrap:hover .mv-item img {
            transform: scale(1.07);
        }

        .mv-info {
            padding: 10px;
            font-size: 14px;
        }

        .mv-title {
            font-weight: 500;
            margin-bottom: 5px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .mv-artist {
            color: #666;
            font-size: 13px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .mv-play-count {
            color: #999;
            font-size: 12px;
        }

        footer {
            margin-top: 60px;
            background: #333;
            height: 200px;
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        @media (max-width: 768px) {
            .new-songs-grid {
                grid-template-columns: repeat(2, 1fr);
            }
             .playlist, .mv-grid {
                 grid-template-columns: repeat(2, 1fr);
             }
             .tag-list, .new-songs-tabs, .mv-tabs {
                 flex-wrap: wrap;
             }
             .new-songs-header {
                 flex-direction: column;
                 align-items: flex-start;
             }
        }
        @media (max-width: 480px) {
            .new-songs-grid {
                grid-template-columns: 1fr;
            }
             .playlist, .mv-grid {
                 grid-template-columns: 1fr;
             }
        }
    </style>
</head>
<body>
    <header>
        <div class="header-inner">
            <div class="logo">
                <img src="https://y.qq.com/mediastyle/yqq/img/logo.png?max_age=2592000" alt="QQ音乐Logo">
            </div>
        </div>
    </header>

    <main>
        <h1 class="section-title">歌单推荐</h1>
        
        <div class="tag-list">
            <a href="#" class="tag-item tag-active">为你推荐</a>
            <a href="#" class="tag-item">运动</a>
            <a href="#" class="tag-item">网络歌曲</a>
            <a href="#" class="tag-item">思念</a>
            <a href="#" class="tag-item">官方歌单</a>
            <a href="#" class="tag-item">情歌</a>
        </div>

        <div class="playlist" id="playlist-container">
            <!-- 歌单内容将通过JS动态加载 -->
        </div>

        <!-- 分页按钮已被移除 -->

        <h1 class="section-title">新歌首发</h1>
        
        <div class="new-songs">
            <div class="new-songs-header">
                <button class="play-all-btn">
                    <div class="triangle-play-btn">
                        <!-- 静态三角形 -->
                        <svg class="triangle-static" viewBox="0 0 16 16" fill="#333">
                            <path d="M4 3 L4 13 L12 8 Z"></path>
                        </svg>
                        <!-- 动画三角形 -->
                        <svg class="triangle-animated" viewBox="0 0 16 16" fill="#31c27c">
                            <path d="M4 3 L4 13 L12 8 Z"></path>
                        </svg>
                    </div>
                    播放全部
                </button>
                
                <div class="new-songs-tabs">
                    <div class="tag-item tag-active">最新</div>
                    <div class="tag-item">内地</div>
                    <div class="tag-item">港台</div>
                    <div class="tag-item">欧美</div>
                    <div class="tag-item">韩国</div>
                    <div class="tag-item">日本</div>
                </div>
            </div>

            <div class="new-songs-grid" id="songlist-container">
               <!-- 新歌内容将通过JS动态加载 -->
            </div>
        </div>

        <h1 class="section-title">MV</h1>
        
        <div class="mv-section">
            <div class="tag-list mv-tabs">
                <a href="#" class="tag-item tag-active">精选</a>
                <a href="#" class="tag-item">内地</a>
                <a href="#" class="tag-item">韩国</a>
                <a href="#" class="tag-item">港台</a>
                <a href="#" class="tag-item">欧美</a>
                <a href="#" class="tag-item">日本</a>
            </div>

            <div class="mv-grid" id="mvlist-container">
                <!-- MV内容将通过JS动态加载 -->
            </div>
        </div>
    </main>

    <footer>
        <p>&copy; 2023 QQ音乐. 保留所有权利.</p>
    </footer>

    <script>
        // 模拟从 task.json 获取数据
        const mockData = {
          "playlist": [
            {
              "title": "翻唱女神J.Fla | 只唱你最爱的旋律",
              "cover": "http://qpic.y.qq.com/music_cover/8HhavvWNIicpyjlv0UnT5TWLRxhfmGTVwYtiaWd54wZItUPRu7486Fqw/300?n=1",
              "listen_num": 8915496
            },
            {
              "title": "古风女声控，优美旋律为你而来",
              "cover": "http://qpic.y.qq.com/music_cover/GUalk7A0sBGvkxmUrXIf7KnEVGJFicuoT7xSkZLHiaEMB5Ojbccf6cbA/300?n=1",
              "listen_num": 1712723
            },
            {
              "title": "想开一家早餐店，叫“早点见面”",
              "cover": "http://qpic.y.qq.com/music_cover/QrmdXDG3R4jGSEzqu0qtR4vw6Glga0N83eKicVCib61BZw5lZtWEUMibQ/300?n=1",
              "listen_num": 525134
            },
            {
              "title": "好评999+英文歌！轻松解压100％",
              "cover": "http://qpic.y.qq.com/music_cover/R8unPZMA4Vp5v2Ms96bst9nFCfe4YPBFBADicMz2LB0kLfEiaUM4ymiag/300?n=1",
              "listen_num": 123948993
            },
            {
              "title": "书房背景乐 沉浸于字里行间的时光",
              "cover": "http://qpic.y.qq.com/music_cover/IknB7UUG0ME0zalRpPKYjJiauia2kJzKs5gtKQY4Vq9TJYLXdjQK9fCA/300?n=1",
              "listen_num": 3033660
            }
          ],
          "songlist": [
            {
              "name": "Sabotage",
              "subtitle": "",
              "singer": [
                "Bebe Rexha"
              ],
              "interval": 176,
              "cover": "https://y.gtimg.cn/music/photo_new/T002R90x90M000002myPA84G7kxG_1.jpg"
            },
            {
              "name": "如果人人爱音乐",
              "subtitle": "",
              "singer": [
                "张蔷"
              ],
              "interval": 226,
              "cover": "https://y.gtimg.cn/music/photo_new/T002R90x90M000003UIhdS4fBLqU_1.jpg"
            },
            {
              "name": "你就不要想起我",
              "subtitle": "",
              "singer": [
                "R1SE赵磊"
              ],
              "interval": 270,
              "cover": "https://y.gtimg.cn/music/photo_new/T002R90x90M000002v6ztM40D0iP_1.jpg"
            },
            {
              "name": "软肋",
              "subtitle": "",
              "singer": [
                "李宇春"
              ],
              "interval": 257,
              "cover": "https://y.gtimg.cn/music/photo_new/T002R90x90M0000005wEOc07Udwu_1.jpg"
            },
            {
              "name": "一爱如故",
              "subtitle": "《长歌行》电视剧插曲",
              "singer": [
                "摩登兄弟刘宇宁"
              ],
              "interval": 235,
              "cover": "https://y.gtimg.cn/music/photo_new/T002R90x90M000003vGVIq243Mzm_2.jpg"
            },
            {
              "name": "向宿命挥拳的人",
              "subtitle": "《新斗罗大陆》手游戴沐白角色曲",
              "singer": [
                "阿云嘎"
              ],
              "interval": 240,
              "cover": "https://y.gtimg.cn/music/photo_new/T002R90x90M000000hNAwr4dbutH_1.jpg"
            },
            {
              "name": "花好月圆",
              "subtitle": "",
              "singer": [
                "周迅"
              ],
              "interval": 154,
              "cover": "https://y.gtimg.cn/music/photo_new/T002R90x90M000000dcpok0A8RP3_2.jpg"
            },
            {
              "name": "Renegades",
              "subtitle": "《浪客剑心 最终章》电影主题曲",
              "singer": [
                "ONE OK ROCK"
              ],
              "interval": 244,
              "cover": "https://y.gtimg.cn/music/photo_new/T002R90x90M000004X1Kbg34UHQ5_1.jpg"
            },
            {
              "name": "驯化者",
              "subtitle": "",
              "singer": [
                "陈俊豪",
                "陈誉庚",
                "TGM-姜京佐",
                "刘冠佑",
                "罗一舟",
                "唐九洲",
                "G.G张思源"
              ],
              "interval": 208,
              "cover": "https://y.gtimg.cn/music/photo_new/T002R90x90M0000018mpfj0lSvS0_1.jpg"
            }
          ],
          "mvlist": [
            {
              "title": "向宿命挥拳的人 (《新斗罗大陆》手游戴沐白角色曲)",
              "singer": "阿云嘎",
              "listen_num": 9370,
              "cover": "https://y.gtimg.cn/music/photo_new/T015R640x360M102000SY7kU0vIuoT.jpg"
            },
            {
              "title": "雨",
              "singer": "Sunnee杨芸晴",
              "listen_num": 3585,
              "cover": "https://y.gtimg.cn/music/photo_new/T015R640x360M000003vHDbe24Jqpl.jpg"
            },
            {
              "title": "一爱如故 (《长歌行》电视剧插曲)",
              "singer": "摩登兄弟刘宇宁",
              "listen_num": 43495,
              "cover": "https://y.gtimg.cn/music/photo_new/T015R640x360M1010047OlaH3P3f0J.jpg"
            },
            {
              "title": "我很好骗",
              "singer": "动力火车",
              "listen_num": 11301,
              "cover": "https://y.gtimg.cn/music/photo_new/T015R640x360M101002cYg662xvSlL.jpg"
            },
            {
              "title": "造梦时学会飞行 (《声梦传奇》主题曲)",
              "singer": "TVB",
              "listen_num": 1539,
              "cover": "https://y.gtimg.cn/music/photo_new/T015R640x360M101001YVtJL2sr2Z7.jpg"
            },
            {
              "title": "What's Wrong With Me (Punk Version)",
              "singer": "Lil Ghost小鬼",
              "listen_num": 206872,
              "cover": "https://y.gtimg.cn/music/photo_new/T015R640x360M101003RlAau1dFne3.jpg"
            },
            {
              "title": "Let's Party (《和平精英》2周年庆派对邀请曲)",
              "singer": "吴宣仪",
              "listen_num": 67024,
              "cover": "https://y.gtimg.cn/music/photo_new/T015R640x360M102003c3tSe1ehWwN.jpg"
            },
            {
              "title": "鋼の羽根",
              "singer": "RADWIMPS",
              "listen_num": 2927,
              "cover": "https://y.gtimg.cn/music/photo_new/T015R640x360M0000013X2t31kvJC4.jpg"
            },
            {
              "title": "에필로그 (epilogue)",
              "singer": "IU",
              "listen_num": 8197,
              "cover": "https://y.gtimg.cn/music/photo_new/T015R640x360M101003aYDEH2kWTX7.jpg"
            },
            {
              "title": "圭贤《Coffee》MV",
              "singer": "圭贤",
              "listen_num": 15163,
              "cover": "https://y.gtimg.cn/music/photo_new/T015R640x360M101000xHMCS1g3sSW.jpg"
            }
          ]
        };

        // 格式化播放量
        function formatListenNum(num) {
            if (num >= 100000000) {
                return (num / 100000000).toFixed(1) + '亿';
            } else if (num >= 10000) {
                return (num / 10000).toFixed(1) + '万';
            }
            return num;
        }

        // 格式化时间
        function formatDuration(seconds) {
            const mins = Math.floor(seconds / 60);
            const secs = seconds % 60;
            return `${mins}:${secs < 10 ? '0' : ''}${secs}`;
        }

        // 渲染歌单
        function renderPlaylist(data) {
            const container = document.getElementById('playlist-container');
            container.innerHTML = data.map(item => `
                <div class="album-item">
                    <div class="cover-wrap">
                        <img class="cover-img" src="${item.cover}" alt="${item.title}">
                        <div class="cover-mask"></div>
                         <svg class="cover-play" viewBox="0 0 16 16">
                            <circle cx="8" cy="8" r="7.5" stroke="white" stroke-opacity="0.8" fill="none"/>
                            <path d="M6.5 5 L6.5 11 L11 8 Z" fill="white"/>
                        </svg>
                    </div>
                    <div class="album-info">
                        <div class="album-title nowrap">${item.title}</div>
                        <div class="album-author nowrap">播放量：${formatListenNum(item.listen_num)}</div>
                    </div>
                </div>
            `).join('');
        }

        // 渲染新歌
        function renderSonglist(data) {
            const container = document.getElementById('songlist-container');
            container.innerHTML = data.map(item => `
                <div class="new-song-item">
                    <div class="new-song-img-wrap">
                        <img src="${item.cover}" alt="${item.name}" class="new-song-img">
                        <div class="new-song-img-mask"></div>
                        <svg class="new-song-play" viewBox="0 0 16 16">
                            <circle cx="8" cy="8" r="7.5" stroke="white" stroke-opacity="0.8" fill="none"/>
                            <path d="M6.5 5 L6.5 11 L11 8 Z" fill="white"/>
                        </svg>
                    </div>
                    <div class="new-song-info">
                        <div class="new-song-title">${item.name}</div>
                        <div class="new-song-artist">${item.singer.join(' / ')}</div>
                    </div>
                    <div class="new-song-duration">${formatDuration(item.interval)}</div>
                </div>
            `).join('');
        }

        // 渲染MV
        function renderMvlist(data) {
            const container = document.getElementById('mvlist-container');
            container.innerHTML = data.map(item => `
                <div class="mv-item">
                    <div class="mv-img-wrap">
                        <img src="${item.cover}" alt="${item.title}">
                        <div class="mv-mask"></div>
                        <svg class="mv-play" viewBox="0 0 16 16">
                            <circle cx="8" cy="8" r="7.5" stroke="white" stroke-opacity="0.8" fill="none"/>
                            <path d="M6.5 5 L6.5 11 L11 8 Z" fill="white"/>
                        </svg>
                    </div>
                    <div class="mv-info">
                        <div class="mv-title">${item.title}</div>
                        <div class="mv-artist">${item.singer}</div>
                        <div class="mv-play-count">${formatListenNum(item.listen_num)}</div>
                    </div>
                </div>
            `).join('');
        }

        // 初始化页面
        function init() {
            renderPlaylist(mockData.playlist);
            renderSonglist(mockData.songlist);
            renderMvlist(mockData.mvlist);
        }

        // 页面加载完成后初始化
        document.addEventListener('DOMContentLoaded', init);
    </script>
</body>
</html>
